﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Collections.ObjectModel;

namespace PM.Entity
{
    public class Security
    {
        #region public methods
        /// <summary>
        /// default constructor of Security. 
        /// </summary>
        public Security()
        {
            this.SecurityId = string.Empty;
            this.Name = string.Empty;
            this.MarketValue = 0;
            this.MarginPercentage = 0;
            this.LastModDate = DateTime.MinValue;    
        }

        public Security(string securityId)
        {
            this.SecurityId = securityId;
        }

        public bool MatchFound(Security security)
        {
            return this.SecurityId == security.SecurityId;
        }

        #endregion

        #region property

        public string SecurityId { get; set; }
        public string Name { get; set; }
        public double MarketValue { get; set; }
        public double MarginPercentage { get; set; }
        public DateTime LastModDate { get; set; }

        #endregion

    }

    public class SecurityCollection : Collection<Security>
    {
        public SecurityCollection()
        {
        }
    }
}
